﻿using System;
using Test.DAL;
using Test.Service.Abstracts;
using TianShu.Modularity;
using TianShu.Service;
using Microsoft.Extensions.DependencyInjection;
using TianShu.AutoMapper;
using TianShu.TenantManagement.Service;
using TianShu.Office;

namespace Test.Service
{
    [DependsOn(
        typeof(TianShuServiceModule),
        typeof(TianShuTenantManagementServiceModule),
        typeof(TestDALModule),
        typeof(AbpAutoMapperModule),
        typeof(TestServiceAbstractsModule),
        typeof(AbpOfficeModule)
        )]
    public class TestServiceModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            context.Services.AddAutoMapperObjectMapper<TestServiceModule>();
            Configure<AbpAutoMapperOptions>(options =>
            {
                options.AddMaps<TestServiceModule>(validate: true);
            });
            context.Services.RegisterTransient<IService>(this.GetType().Assembly);
        }
    }
}
